]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Bug 592507 - Javascript exception when ~/.gtk-bookmarks is missing
authorThomas Wood <thos@gnome.org>
Thu, 20 Aug 2009 20:39:04 +0000 (21:39 +0100)
committerThomas Wood <thos@gnome.org>
Sat, 29 Aug 2009 13:26:26 +0000 (14:26 +0100)
Check the file exists before trying to access it and simply return if it
is not available.

js/ui/places.js

index b122c5d83d083366e31d2dfdd0dd7a713531dc98..12bb8bd17ea753a00dc38c16f03ba6310694cdd3 100644 (file)
@@ -151,6 +151,9 @@ Places.prototype = {
 
         this._dirsBox.remove_all();
 
+        if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
+          return;
+
         let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
 
         if (!success)